%&Plain
% This file illustrates the use (and abuse) of PostScript fonts
% in a Plain TeX document.

\input psnames  % defines macros for names of PostScript TFMs
\input pstext   % defines \PStext and \CMtext

\nopagenumbers
\parindent=0pt
\parskip=0pt
\hsize=9in

The following fonts should be available in all PostScript printers:

\font\cour=\Courier at 10pt
\font\helv=\Helv at 10pt
\font\helvb=\HelvB at 10pt
\font\helvo=\HelvO at 10pt
\font\helvbo=\HelvBO at 10pt
\font\ts=\TimesS at 10pt
\font\tbs=\TimesBS at 10pt
\font\tr=\TimesR at 10pt
\font\tb=\TimesB at 10pt
\font\ti=\TimesI at 10pt
\font\tbi=\TimesBI at 10pt
\font\sy=\Symbol at 10pt
\font\sys=\SymbolS at 10pt

\leftline{\cour Courier}
\leftline{\helvb Helvetica-Bold}
\leftline{\helvbo Helvetica-BoldOblique}
\leftline{\helvo Helvetica-Oblique}
\leftline{\helv Helvetica}
\leftline{\tb Times-Bold}
\leftline{\tbi Times-BoldItalic}
\leftline{\ti Times-Italic}
\leftline{\ts Slanted-Times-Roman}
\leftline{\tbs Slanted-Times-Bold}
\leftline{\tr Times-Roman}
\leftline{\sy  \char'104\char'105\char'106\char'107 \rm\ (from Symbol)}
\leftline{\sys \char'104\char'105\char'106\char'107 \rm\ (from Slanted-Symbol)}

\bigskip

A PostScript font can be used at any desired size:

\font\trB=\TimesR at 33.5pt

\bigskip

\leftline{\trB Times-Roman at 33.5pt}

\bigskip

\def\testtext{%
``the quick brown fox jumps over a lazy dog''\par
``THE QUICK BROWN FOX JUMPS OVER A LAZY DOG''\par
ligatures: fluffy, waffle, firefly, difficult, en--dash, em---dash\par
kerning: boxer, cooked, vowel\par
`foreign' letters:\par
\'o \`o \^o \"o \~o \=o \u o \v o \H o \.o \c o \d o \b o
\oe\ \OE\ \ae\ \AE\ \aa\ \AA\ \o\ \O\ \l\ \L\ \ss\ \i\ \j \par
}

\rm
Computer Modern text:\par
\testtext

\bigskip

\PStext
\tr
PostScript text:\par
\testtext

\bigskip

Other characters available in T1-encoded virtual PostScript fonts:\par
\pounds\ \guillemotleft\ \guillemotright\ 
\guilsinglleft\ \guilsinglright\ \quotesinglbase\ \quotedblbase

\bigskip

Some characters can only be accessed from a raw PostScript font:

\font\rawtm=ptmr8r at 10pt
\rawtm
\char'242 \char'245 \char'262 \char'263 \char'275

\bigskip

\CMtext
\rm
A PostScript font usually appears {\tr darker and larger} than
an ``equivalent'' Computer Modern font.


% \vfill\eject

% DVIPS output causes a "limitcheck" error on my LW Select 310
% if I try to fit the Utopia example on the above page.

Let's test non-resident PostScript fonts:
\bigskip

\font\utopa=\UtopiaR at 14pt
{\PStext \utopa
Utopia is a non-resident PostScript font.\par
\testtext
}

\bigskip
Same non-resident PostScript font but at a different size.
The font info should only be downloaded once:
\bigskip

\font\utopb=\UtopiaR at 10pt
{\PStext \utopb
Utopia is a non-resident PostScript font.\par
\testtext
}

\bigskip
And now a bold version:
\bigskip

\font\utopc=\UtopiaB at 10pt
{\PStext \utopc
Utopia-Bold.\par
}

\bye
